<template>
  <view class="container">
    <!-- 头部标题 -->
    <view class="header">
      <text class="title">测试多量表报告功能</text>
    </view>
    
    <!-- 主内容区域 -->
    <view class="content">
      <text class="message">{{ message }}</text>
      
      <!-- 功能按钮 -->
      <view class="buttons-container">
        <button class="primary-button" @tap="generateTestData">生成测试数据</button>
        <button class="secondary-button" @tap="navigateToReport">直接查看报告</button>
      </view>
      
      <!-- 提示信息 -->
      <view class="info-section">
        <text class="info-title">功能说明：</text>
        <text class="info-text">1. 点击"生成测试数据"按钮，系统会自动生成抑郁、焦虑、狂躁三个量表的随机测试数据</text>
        <text class="info-text">2. 数据生成后，系统会自动跳转到查看报告页面</text>
        <text class="info-text">3. 在查看报告页面，您将看到三个量表的测试结果分别显示</text>
      </view>
    </view>
  </view>
</template>

<script>
import { createTestPage } from './testAllScales.js';

export default {
  ...createTestPage()
};
</script>

<style scoped>
.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f5f5f5;
  padding: 30rpx;
}

.header {
  text-align: center;
  margin-bottom: 50rpx;
  padding-top: 30rpx;
}

.title {
  font-size: 40rpx;
  font-weight: bold;
  color: #333;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20rpx;
}

.message {
  font-size: 32rpx;
  color: #666;
  text-align: center;
  margin-bottom: 40rpx;
  line-height: 50rpx;
}

.buttons-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20rpx;
  margin-bottom: 50rpx;
}

.primary-button {
  background-color: #1aad19;
  color: #fff;
  font-size: 34rpx;
  width: 80%;
  margin: 0 auto;
}

.secondary-button {
  background-color: #f0f0f0;
  color: #666;
  font-size: 32rpx;
  width: 60%;
  margin: 0 auto;
}

.info-section {
  width: 100%;
  background-color: #fff;
  border-radius: 20rpx;
  padding: 30rpx;
  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}

.info-title {
  font-size: 32rpx;
  font-weight: bold;
  color: #333;
  display: block;
  margin-bottom: 20rpx;
}

.info-text {
  font-size: 28rpx;
  color: #666;
  display: block;
  margin-bottom: 15rpx;
  line-height: 45rpx;
}
</style>